
#include "StdAfx.h"
#include "User.h"

User::User(){
	reset();
}

User::~User(){	
}

void User::reset(){
	id_ = "";
	passwd_ = "";
	ip_ = "";
	ident_ = 0;
	room_ = 0;
	type_ = DEF_USER_TYPE_NORMAL;
	login_ = false;	
}

bool User::isTypeNormal(){
	if( type_ == DEF_USER_TYPE_NORMAL )
		return true;
	return false;
}

bool User::isTypeObserver(){
	if( type_ == DEF_USER_TYPE_OBSERVER )
		return true;
	return false;
}

void User::setObserver(){
	type_ = DEF_USER_TYPE_OBSERVER;
}

void User::setNotObserver(){
	type_ = DEF_USER_TYPE_NORMAL;
}
